<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.tjsinfo.tjsoa.messageImportant.vo.MessageImportantMain"%>
<%@page import="com.tjsinfo.tjsoa.messageImportant.vo.MessageImportantIncept"%>
<%@page import="com.tjsinfo.tjsoa.messageImportant.vo.MessageImportantFileUpload"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String treePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/RQOAtree/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>"/>
		<title>粮油集团办公自动化协作平台</title>
		<link href="<%=basePath%>style/txlz7.css" rel="stylesheet" type="text/css" id="txlz7" />
		<script type='text/javascript' src='<%=basePath%>dwr/interface/OfficeResourceStockBo.js'></script>
		<script type='text/javascript' src="<%=basePath%>dwr/engine.js"></script>
		<script type='text/javascript' src="<%=basePath%>dwr/util.js"></script>
		<link href="<%=treePath %>ajaxLibrary/ext/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="<%=treePath %>ajaxLibrary/ext/ext-base.js"></script>
		<script type="text/javascript" src="<%=treePath %>ajaxLibrary/ext/ext-all.js"></script>
		<script type="text/javascript" src="<%=treePath %>ajaxLibrary/ext/ext-lang-zh_CN.js"></script>
		<script type="text/javascript">
		  function submitRequest(id){
			  Ext.MessageBox.confirm("OA办公自动化系统","您确定要删除该条记录?",function(btn){
			  		if(btn == 'yes')
			  		{
			  			$("#messageid").attr("value",id);
			  			msg();
			 			document.forms[0].submit();	
			  		}
			  });
		  }
		  
		  window.onload = function(){
			var tb = new Ext.Toolbar(
				{
					height:25
				}
			);
		
			tb.add(
		    {
		            text:'返回',
		            iconCls: 'daohang',
		        	handler: function(){
		        		window.location.href = '<%=basePath %>tjsinfo/tjsoa/messageImportant/loginReceiveMain.do';
					}
		    }
		    );
		    tb.render('menu');
			document.getElementById("right").style.height = document.body.clientHeight-60;
		}
		</script>
		<%
					MessageImportantMain importantMain = (MessageImportantMain) request
					.getAttribute("importantMain");
		%>
	</head>
<body style="background:#D9E8F1;">
	<form action="<%=basePath %>tjsinfo/tjsoa/messageImportant/deleteMessage.do" name="form1" method="post">
		<input type="hidden" name="id" id="messageid" />
	</form>
		<div id="right" style="height: 100%">
			<div id="menu" style="padding-top: 4px;"></div>
			<table width="100%" border="0" cellspacing="0" cellpadding="0"
				height="100%">
				<tr>
					<td valign="top" height="100%">
						<div class="contabwd">
							<table width="740" border="0" cellspacing="0" cellpadding="0"
								class="bgypff" align="center">
								<tr>
									<%
									String info = importantMain.getInfo().replace("<br/>", "\r\n");
									%>
									<td width="10%" align="right" valign="top">
										&nbsp;发送内容:
									</td>
									<td>
										<textarea rows="7" cols="91" name="views" id="views" readonly="readonly"><%=info%></textarea>
									</td>
								</tr>
							</table>
							<table width="740px" border="0" cellspacing="0" cellpadding="0"
								align="center">
								<tr>
									<td width="100%" align="left" colspan="4">
										<div style="height: 1px"></div>
										&nbsp;&nbsp;
										<img src="<%=basePath%>images/dfdf_03.gif" />
										&nbsp;附件列表:
									</td>
								</tr>
								<tr>
									<td width="100%" align="left" colspan="4">
										<div style="height: 1px"></div>
									</td>
								</tr>
								<tr>
									<td colspan="4" align="center">
										<div class="bgypff_10">
											<table width="740px" border="0" cellspacing="0">
												<tr>
													<td>
														<table class="p_08" width="760px" border="0"
															cellspacing="0">
															<tr>
																<th width="350px" style="text-align: center">
																	文件名
																</th>
																<th width="390px" style="text-align: center">
																	操作
																</th>
															</tr>
														</table>
													</td>
												</tr>
												<tr>
													<td>
														<div id="stockdiv"
															style="overflow-y: scroll; overflow-x: hidden; height: 200px">
															<table class="p_08" width="740px" border="0"
																cellspacing="0" style="border: 1px">
																<%
																	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
																	List fileList = (List)request.getAttribute("fileList");
																	for (Iterator iterator = fileList.iterator(); iterator.hasNext();) {
																		MessageImportantFileUpload file = (MessageImportantFileUpload) iterator
																		.next();
																%>
																<tr>
																	<td width="330px"><%=file.getOldFileName()%></td>
																	<td width="350px"><a href="<%=basePath %>tjsinfo/tjsoa/messageImportant/ioAction.do?id=<%=file.getUuid()%>">下载</a></td>
																</tr>
																<%
																}
																%>
															</table>
														</div>
													</td>
												</tr>
											</table>
										</div>
									</td>
								</tr>
							</table>
						</div>
					</td>
				</tr>
			</table>
		</div>
	</body>
</html>
